package cn.abyss.admin.enums;

/**
 * Description:
 *
 * @author zhangsj
 * @date Created on 2020/12/15
 */
public enum AdminWebExceptionEnum {

    ADMIN_WEB_MEMBER_QUERY_FAIL("1001", "查询成员失败"),
    ADMIN_WEB_MEMBER_INSERT_FAIL("1002", "新增成员失败"),
    ADMIN_WEB_MEMBER_UPDATE_FAIL("1003", "更新成员失败"),
    ADMIN_WEB_MEMBER_DELETE_FAIL("1004", "删除成员失败"),
    ADMIN_WEB_MEMBER_SUM_QUERY_FAIL("1005", "汇总查询失败"),
    ADMIN_WEB_MEMBER_NO_PARA("1006", "缺少参数"),
    ADMIN_WEB_MEMBER_AUTHCODE_FAIL("1007", "获取验证码失败"),
    ADMIN_WEB_MEMBER_REGISTER_FAIL("1008", "用户注册失败"),
    ADMIN_WEB_MEMBER_LOGIN_FAIL("1009", "用户登记失败"),
    ADMIN_WEB_MEMBER_QUERY_BYNAME_FAIL("1010", "根据用户名查询失败"),
    ADMIN_WEB_RESOURCE_QUERY_BYNAME_FAIL("1011", "根据用户编码查询资源失败"),
    ADMIN_WEB_MEMBER_QUERY_BYID_FAIL("1012", "根据主键查询用户信息失败"),
    ADMIN_WEB_PERMISSION_QUERY_BYNAME_FAIL("1013", "根据用户编码查询权限失败"),

    ADMIN_WEB_MEMBER_ROLE_RELATION_QUERY_FAIL("2001", "查询成员角色关联表失败"),
    ADMIN_WEB_MEMBER_ROLE_RELATION_INSERT_FAIL("2002", "新增成员角色关联表失败"),
    ADMIN_WEB_MEMBER_ROLE_RELATION_UPDATE_FAIL("2003", "更新成员角色关联表失败"),
    ADMIN_WEB_MEMBER_ROLE_RELATION_DELETE_FAIL("2004", "删除成员角色关联表失败"),
    ADMIN_WEB_MEMBER_ROLE_RELATION_SUM_QUERY_FAIL("2005", "汇总查询失败"),
    ADMIN_WEB_MEMBER_ROLE_RELATION_NO_PARA("2006", "缺少参数"),

    ADMIN_WEB_LOGIN_LOG_INSERT_FAIL("3001", "新增登录日志失败"),
    CHECK_ORG_FAIL2("0002", "非法操作！");


    private final String code;
    private final String message;
    private final BaseAdminWebExceptionLevelEnum level;
    AdminWebExceptionEnum(String code, String message){
        this(code, message, BaseAdminWebExceptionLevelEnum.INTERNAL_EXCEPTION);
    }
    AdminWebExceptionEnum(String code, String message, BaseAdminWebExceptionLevelEnum level){
        this.code = code;
        this.message=message;
        this.level = level;
    }
    public String getCode(){
        return code;
    }
    public String getMessage(){
        return message;
    }
    public BaseAdminWebExceptionLevelEnum getLevel(){
        return level;
    }
}
